<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>管理员列表</title>

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/Theme1/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="__PUBLIC__/Theme1/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="__PUBLIC__/Theme1/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Theme1/css/style.min.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>管理员列表 <a href="__URL__/manageadd" style="margin-left: 15px; color: #06cbc4">添加管理员</a></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            
                        </div>
                    </div>
                    <div class="ibox-content">

                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
                                    <th class="dropdown hidden-xs">ID</th>
                                    <th>登陆账号</th>
                                    <th class="dropdown hidden-xs">真实姓名</th>
                                    <th class="dropdown hidden-xs">性别</th>
                                    <th class="dropdown hidden-xs">电话</th>
                                    <th >角色名</th>
                                    <th class="dropdown hidden-xs">管辖范围</th>
                                    <th class="dropdown hidden-xs">使用状态</th>
                                    <th class="dropdown hidden-xs">登录状态</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            <foreach name="rs_admin" item="val_admin">
                                <tr>
                                    <td class="dropdown hidden-xs"><{$val_admin.aId}></td>
                <td><{$val_admin.aUser}></td>
                <td class="dropdown hidden-xs"><{$val_admin.aName}></td>
                <if condition="$val_admin.aSex eq 1">
                <td class="dropdown hidden-xs">男</td>
                <else/>
                <td class="dropdown hidden-xs">女</td>
                </if>
                <td class="dropdown hidden-xs"><{$val_admin.aTel}></td>

                <if condition="$val_admin.aPowers eq 0">
                <td><span >系统管理员</span></td>
                <elseif condition="$val_admin.aPowers eq 1"/>
                    <td><span >本级管理员</span></td>
                 <elseif condition="$val_admin.aPowers eq 2"/>
                     <td><span >操作管理员</span></td>
                </if>
                <if condition="$val_admin.manageRegione eq 0">
                <td class="dropdown hidden-xs">全部</td>
                <else/>
                <php>
                $id=$val_admin["manageRegione"];
                    $regione=M("regione");
                    $regioneInfo=$regione->where("id='{$id}'")->field("id,name")->find();
                </php>
                <td class="dropdown hidden-xs" ><{$regioneInfo["name"]}></td>

                
                </if>
                </if>
                <if condition="$val_admin.aPowers eq 0">
                    <td class="dropdown hidden-xs td-status"><span class="label label-success radius">默认启用</span></td>
                <else/>
                    <if condition="$val_admin.aStatic eq 1">
                    <td class="td-status dropdown hidden-xs "><span class="label label-success radius"><a href="__URL__/ManageUpdateStatic/ast/0/aId/<{$val_admin.aId}>" style="color:#ffffff">已启用</a></span></td>
                    <else/>
                    <td class="td-status dropdown hidden-xs "><span class="label label-error radius"><a href="__URL__/ManageUpdateStatic/ast/1/aId/<{$val_admin.aId}>" style="color:#ffffff">已停用</a></span>
                    </td>
                    </if>
                </if>
                <if condition="$val_admin.aPowers eq 0">
                    <td class="td-status dropdown hidden-xs "><span class="label label-success radius">默认正常</span></td>
                <else/>
                <if condition="($val_admin.aErrorPwdNum neq $systemEPLN) AND ($val_admin.aErrorPwdNum neq -1)">
                <td class="td-status dropdown hidden-xs "><span class="label label-success radius"><a href="__URL__/ManageUpdateLock/lock/-1/aId/<{$val_admin.aId}>" style="color:#ffffff">正常状态</a></span></td>
                <elseif condition="$val_admin.aErrorPwdNum eq -1"/>
                <td class="td-status dropdown hidden-xs "><span class="label label-error radius"><a href="__URL__/ManageUpdateLock/lock/0/aId/<{$val_admin.aId}>" style="color:#ffffff">管理员锁定</a></span></td>
                <elseif condition="$val_admin.aErrorPwdNum eq $systemEPLN"/>
                <td class="td-status dropdown hidden-xs "><span class="label label-error radius"><a href="__URL__/ManageUpdateLock/lock/0/aId/<{$val_admin.aId}>" style="color:#ffffff">系统锁定</a></span></td>
                </if>
                </if>
                <if condition="$val_admin.aPowers eq 0">
                <if condition="$sessionPowers eq 0">
                <td class="td-manage">
                 <a title="修改我的资料" href="__URL__/manageupdate/aId/<{$val_admin.aId}>" style="text-decoration:none">修改我的资料</a>
                </td>
                <else/>
                <td class="td-manage">
                 <span style="color:#ff0000">内置管理员</span>
                </td>
                </if>
                <else/>
                <td class="td-manage">
                <if condition="$val_admin.aId eq $sessionaId">
                    <span style="color:#1247F3">当前登录账户</span><a title="修改我的资料" href="__URL__/manageupdate/aId/<{$val_admin.aId}>" style="text-decoration:none"><i class="glyphicon glyphicon-pencil"></i></a>
                <else/>
                    <a title="修改" href="__URL__/manageupdate/aId/<{$val_admin.aId}>"  style="text-decoration:none"><i class="glyphicon glyphicon-pencil"></i></a>
                
                <a title="删除" onclick="if(confirm('确定删除?')==false)return false;" href="__URL__/ManageDelAction/aId/<{$val_admin.aId}>" style="text-decoration:none; margin-left:10px;"><i class="glyphicon glyphicon-remove"></i></a>
                </if>
                </td>
                </if>
                                   
                                </tr>
                              </foreach>
                            </tbody>
                            
                        </table>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/Theme1/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/Theme1/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="__PUBLIC__/Theme1/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="__PUBLIC__/Theme1/js/content.min.js?v=1.0.0"></script>
    <script>
        $(document).ready(function(){$(".dataTables-example").dataTable();var oTable=$("#editable").dataTable();oTable.$("td").editable("../example_ajax.php",{"callback":function(sValue,y){var aPos=oTable.fnGetPosition(this);oTable.fnUpdate(sValue,aPos[0],aPos[1])},"submitdata":function(value,settings){return{"row_id":this.parentNode.getAttribute("id"),"column":oTable.fnGetPosition(this)[2]}},"width":"90%","height":"100%"})});function fnClickAddRow(){$("#editable").dataTable().fnAddData(["Custom row","New row","New row","New row","New row"])};
    </script>

</body>

</html>
